package cn.wolfcode.luowowo.respository;

import cn.wolfcode.luowowo.domain.Region;
import cn.wolfcode.luowowo.domain.Travel;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户持久层接口
 */
@Repository
public interface TravelRespository extends MongoRepository<Travel, String> {


    /**
     * 获取指定目的地下前三游记  travels
     * @param destId
     * @param of
     * @return
     */
    List<Travel> findByDestId(String destId, PageRequest of);

    /**
     * 根据目的地名字 查询游记
     * @param destName
     * @return
     */
    List<Travel> findByDestName(String destName);
}
